/* ==================== 导航栏样式 ==================== */
/* 更新时间: 2024-12-19 白色主题 */

/* 导航栏主体 */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
    min-height: 70px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* 强制覆盖Bootstrap默认样式 */
.navbar-default {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* 导航栏容器 */
.navbar .container-fluid {
    padding: 0 30px;
    display: flex;
    align-items: center;
    min-height: 70px;
}

/* 品牌Logo区域 */
.navbar-header {
    display: flex;
    align-items: center;
}

.navbar-brand {
    color: #333333 !important;
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 强制覆盖Bootstrap默认样式 */
.navbar-default .navbar-brand {
    color: #333333 !important;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.navbar-brand::before {
    content: '🎵';
    font-size: 32px;
    -webkit-text-fill-color: initial;
    background: none;
}

/* 汉堡菜单按钮 */
.navbar-toggle {
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0;
    transition: all 0.3s ease;
}

.navbar-toggle:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.navbar-toggle .icon-bar {
    background-color: #333333;
    height: 3px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 导航菜单 */
.navbar-collapse {
    border: none;
    box-shadow: none;
}

.navbar-nav {
    margin: 0;
    display: flex;
    align-items: center;
}

.navbar-nav > li {
    margin: 0 5px;
}

.navbar-nav > li > a {
    color: rgba(51, 51, 51, 0.9) !important;
    font-weight: 500;
    font-size: 16px;
    padding: 12px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 强制覆盖Bootstrap默认样式 */
.navbar-default .navbar-nav > li > a {
    color: rgba(51, 51, 51, 0.9) !important;
}

.navbar-nav > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

.navbar-nav > li > a:hover::before {
    left: 100%;
}

.navbar-nav > li > a:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.navbar-nav > li.active > a {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

/* 下拉菜单 */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    margin-top: 10px;
    min-width: 200px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu > li > a {
    color: #333 !important;
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
}

.dropdown-menu > li > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    z-index: -1;
}

.dropdown-menu > li > a:hover::before {
    width: 100%;
}

.dropdown-menu > li > a:hover {
    color: #ffffff !important;
    background: transparent;
    transform: translateX(5px);
    text-decoration: none;
}

.dropdown-menu .divider {
    background: rgba(0, 0, 0, 0.1);
    height: 1px;
    margin: 8px 0;
}

/* 搜索表单 */
.navbar-form {
    margin: 0 20px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-form .form-group {
    margin: 0;
    position: relative;
}

.navbar-form .form-control {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    color: #333333;
    padding: 10px 20px;
    width: 250px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.navbar-form .form-control:focus {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.navbar-form .form-control::placeholder {
    color: rgba(51, 51, 51, 0.6);
    font-style: italic;
}

.navbar-form .btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
}

.navbar-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
    color: #ffffff;
}

.navbar-form .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(238, 90, 36, 0.3);
}

/* 右侧用户菜单 */
.navbar-nav.navbar-right {
    margin-left: auto;
}

.navbar-nav.navbar-right > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 用户头像（如果有的话） */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    object-fit: cover;
}

/* 音乐分类按钮样式 */
.dropdown-toggle::after {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
    border-top: 5px solid;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    color: rgba(51, 51, 51, 0.8);
    transition: all 0.3s ease;
}

.dropdown.open .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container-fluid {
        padding: 0 15px;
    }
    
    .navbar-brand {
        font-size: 24px;
    }
    
    .navbar-form .form-control {
        width: 200px;
    }
    
    .navbar-nav > li > a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 20px;
    }
    
    .navbar-form {
        margin: 10px 0;
    }
    
    .navbar-form .form-control {
        width: 150px;
        padding: 8px 15px;
    }
    
    .navbar-form .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .navbar-nav > li > a {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 动画效果 */
.navbar-nav > li {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.navbar-nav > li:nth-child(1) { animation-delay: 0.1s; }
.navbar-nav > li:nth-child(2) { animation-delay: 0.2s; }
.navbar-nav > li:nth-child(3) { animation-delay: 0.3s; }
.navbar-nav > li:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动效果 */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* 特殊效果 */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(102, 126, 234, 0.05) 50%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 通知徽章 */
.badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #ffffff;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    position: absolute;
    top: -5px;
    right: -5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
